<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('银河票务商品列表')" />
</head>
<body class="gray-bg">
	<div class="container-div">
		<div class="row">
	        <div class="col-sm-12 select-table table-striped">
			    <table id="bootstrap-table"></table>
			</div>
		</div>
	</div>
	<th:block th:include="include :: footer" />
	<script th:inline="javascript">
		var editFlag = [[${@permission.hasPermi('galaxy:project:detail')}]];
		var prefix = ctx + "galaxy/project";

		$(function() {
		    var options = {
		        url: prefix + "/list",
				updateUrl: prefix + "/detail/{id}",
				modalName: "商品",
		        columns: [{
		            checkbox: true
		        },
				{
					field: 'projectName',
					title: '商品名称'
				},
				{
					field: 'projectToken',
					title: '商品编码'
				},
				{
					field: 'projectTypeName',
					title: '商品类型'
				},
				{
					field: 'siteName',
					title: '站点',
					sortable: true
				},
				{
					field: 'minPrice',
					title: '最低价',
					sortable: true
				},
				{
					field: 'maxPrice',
					title: '最高价'
				},
				{
					field: 'startTime',
					title: '开始时间',
					sortable: true
				},
				{
					field: 'endTime',
					title: '结束时间',
					sortable: true
				},
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
						var actions = [];
						actions.push('<a class="btn btn-warning btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.projectToken + '\')"><i class="fa fa-search"></i>购买</a>');
		                return actions.join('');
		            }
		        }]
		    };
		    $.table.init(options);
		});
	</script>
</body>
</html>